home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 June / EnigmA AMIGA RUN 08 (1996)(G.R. Edizioni)(IT)[!][issue 1996-06][EARSAN CD VII].iso / earcd / utmisc1 / alcun101.lha / src / global.h < prev    next >
C/C++ Source or Header  |  1995-01-12  |  4KB  |  153 lines

  1. /*
  2.  *  This file is part of x48, an emulator of the HP-48sx Calculator.
  3.  *  Copyright (C) 1994  Eddie C. Dost  (ecd@dressler.de)
  4.  *
  5.  *  This program is free software; you can redistribute it and/or modify
  6.  *  it under the terms of the GNU General Public License as published by
  7.  *  the Free Software Foundation; either version 2 of the License, or
  8.  *  (at your option) any later version.
  9.  *
  10.  *  This program is distributed in the hope that it will be useful,
  11.  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13.  *  GNU General Public License for more details.
  14.  *
  15.  *  You should have received a copy of the GNU General Public License
  16.  *  along with this program; if not, write to the Free Software
  17.  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  18.  */
  19.  
  20. /* $Log: global.h,v $
  21.  * Revision 1.5  1994/12/08  22:28:39  ecd
  22.  * added generic define for SYSV_TIME if SYSV is defined
  23.  *
  24.  * Revision 1.4  1994/12/07  20:16:41  ecd
  25.  * added more functions missing in SunOS includes
  26.  *
  27.  * Revision 1.4  1994/12/07  20:16:41  ecd
  28.  * added more functions missing in SunOS includes
  29.  *
  30.  * Revision 1.3  1994/11/02  14:51:27  ecd
  31.  * new define for SYSV_TIME
  32.  *
  33.  * Revision 1.2  1994/10/06  16:28:03  ecd
  34.  * added #define USE_SHM
  35.  *
  36.  * Revision 1.1  1994/09/07  12:53:20  ecd
  37.  * Initial revision
  38.  *
  39.  *
  40.  * $Id: global.h,v 1.5 1994/12/08 22:28:39 ecd Exp ecd $
  41.  */
  42.  
  43. #ifndef _GLOBAL_H
  44. #define _GLOBAL_H 1
  45.  
  46. #ifdef __ProtoType__
  47. #undef __ProtoType__
  48. #endif
  49.  
  50. #ifdef __FunctionProto__
  51. #undef __FunctionProto__
  52. #endif
  53.  
  54. #if defined(__STDC__) || defined(__cplusplus)
  55. #define __ProtoType__(x) x
  56. #define __FunctionProto__ 1
  57. #else
  58. #define __ProtoType__(x) ()
  59. #undef __FunctionProto__
  60. #endif
  61.  
  62. #if !defined(__GNUC__) || defined(__STRICT_ANSI__)
  63. #define inline 
  64. #if !defined(__STDC__)
  65. #define const
  66. #endif
  67. #endif
  68.  
  69. /*
  70.  * If we are running Linux, `linux' will be defined by gcc.
  71.  */
  72. #if defined(linux)
  73.  
  74. #ifndef LINUX
  75. #define LINUX    1
  76. #endif
  77.  
  78. #define SYSV_TIME 1
  79.  
  80. #else    /* Not Linux */
  81.  
  82. #if defined(sun) && defined(unix)
  83.  
  84. #if defined(__svr4__) || defined(SVR4) || defined(SYSV)
  85.  
  86. #ifndef SOLARIS
  87. #define SOLARIS    1
  88. #endif
  89.  
  90. #define SYSV_TIME 1
  91.  
  92. #else  /* Not Solaris */
  93.  
  94. #if defined(hpux)
  95.  
  96. #ifndef HPUX
  97. #define HPUX    1
  98. #endif
  99.  
  100. #else  /* Not HP-UX */
  101.  
  102. #ifndef SUNOS
  103. #define SUNOS    1
  104. #endif
  105.  
  106. #endif  /* Not HP-UX */
  107. #endif  /* Not Solaris */
  108. #endif    /* Sun && Unix */
  109. #endif    /* Not Linux */
  110.  
  111. #ifdef SYSV
  112. #ifndef SYSV_TIME
  113. #define SYSV_TIME 1
  114. #endif
  115. #endif
  116.  
  117. #ifdef SUNOS
  118. #undef HAVE_STDIO
  119. #else
  120. #define HAVE_STDIO 1
  121. #endif
  122.  
  123. #ifndef HAVE_STDIO
  124. #include <stdio.h>
  125. #include <sys/time.h>
  126. #include <sys/types.h>
  127. extern int      printf        __ProtoType__((char *, ...));
  128. extern int      fprintf        __ProtoType__((FILE *, char *, ...));
  129. extern int    sscanf        __ProtoType__((char *, char *, ...));
  130. extern void     fflush        __ProtoType__((FILE *));
  131. extern int      fseek        __ProtoType__((FILE *, long, int));
  132. extern int      fread        __ProtoType__((void *, int, int, FILE*));
  133. extern int      fwrite        __ProtoType__((void *, int, int, FILE*));
  134. extern void     fclose        __ProtoType__((FILE *));
  135. extern int    fgetc        __ProtoType__((FILE *));
  136. extern void     bzero        __ProtoType__((void *, int));
  137. extern time_t    time        __ProtoType__((time_t *));
  138. extern int      select        __ProtoType__((int, fd_set *, fd_set *,
  139.                                                fd_set *, struct timeval *));
  140. extern int      setitimer    __ProtoType__((int, struct itimerval *,
  141.                                                struct itimerval *));
  142. extern int    gethostname    __ProtoType__((char *, int));
  143. #ifdef HAVE_XSHM
  144. #include <sys/ipc.h>
  145. #include <sys/shm.h>
  146. extern int    shmget        __ProtoType__((key_t, int, int));
  147. extern int    shmat        __ProtoType__((int, void *, int));
  148. extern int    shmctl        __ProtoType__((int, int, struct shmid_ds *));
  149. #endif
  150. #endif
  151.  
  152. #endif /* !_GLOBAL_H */
  153.